Carbon


PBExchangeObjectsAsync

Header: Files.h Carbon status: Supported

Swaps the contents of two files.

void PBExchangeObjectsAsync (
    FSRefParam *paramBlock
);
paramBlock

A pointer to a parameter block.

DISCUSSION

The relevant fields of the parameter blockare:

The PBExchangeObjectsAsync function allows programs to implement a “safe save” operation by creating and writing a complete new file and swapping the contents. An alias, FSSpec or FSRef that refers to the old file will now access the new data.

The corresponding information in in-memory data structures are also exchanged. Either or both files may have open access paths. After the exchange, the access path will refer to the opposite file’s data (that is, to the same data it originally referred, which is now part of the other file).

AVAILABILITY

Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)